<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>AngularJS service</title>
    <script src="../bower_components/angular/angular.min.js"></script>
</head>
<body ng-app="myapp">

    <script type="text/javascript">
        angular.module('myapp', [])
            .factory('myService', function() {
                return {
                    'username': 'aUser'
                }
            });
    </script>
</body>
</html>